﻿#ifndef CMDLINECHARTCENTERWIDGETDIALOGADDLOCALRANGE_H
#define CMDLINECHARTCENTERWIDGETDIALOGADDLOCALRANGE_H

#include "CommandManager/CommandBase.h"

namespace PostCommand
{
    /// @brief 后处理保存图像命令
    class CmdLineChartCenterWidgetDialogAddLocalRange : public CommandManager::CommandBase
    {
        Q_OBJECT

        public:
            CmdLineChartCenterWidgetDialogAddLocalRange();
            ~CmdLineChartCenterWidgetDialogAddLocalRange();

            bool execute() override;
            void undo() override;
            void redo() override;
            void setData(double rangeLower, double rangeUpper, QString selectNames, bool execFlag, bool edit) {
                 m_rangeLower = rangeLower;
                 m_rangeUpper = rangeUpper;
                 m_selectNames = selectNames;
                 m_execFlag = execFlag;
                 m_edit = edit;
            }

        private:
            double m_rangeLower{};
            double m_rangeUpper{};
            QString m_selectNames{};
            bool m_execFlag{};
            bool m_edit{};
    };

} // namespace PostCommand

#endif
